package basic;

import org.junit.Test;

/**
 * @Author tuyou_cd
 * @Date 2020/8/6 17:44
 */
public class BasicTest {

    @Test
    public void leftMove() {
        System.out.println(8 << 1);
    }

    @Test
    public void rightMove() {
        System.out.println(8 >> 1);
        System.out.println(Integer.toBinaryString(-1));
        System.out.println(-1 >> 1);
        System.out.println(Integer.toBinaryString(-1 >> 1));
    }

    @Test
    public void rightMoveUnsigned() {
        System.out.println(1 >>> 1);
        System.out.println(-1 >>> 1);
        System.out.println((-1 ));
    }
}
